You are here: Symbol Reference > Dew Namespace > Dew.Math Namespace > Classes > TMtx Class > TMtx Methods > Equal Method > TMtx.Equal Method ([In] TMtx, double)
Dew Math for .NET
ContentsIndexHome
PreviousUpNext
TMtx.Equal Method ([In] TMtx, double)

Compares two matrices.

Syntax
C#
Visual Basic
public bool Equal([In] TMtx Mtx, double Tolerance);

Compares Mtx with the calling matrix and returns true if the matrices are equal (if all elements match in position and value). Tolerance defines the comparison tolerance. The maximum difference between elements may not exceed: +/-Tolerance. If Tolerance is omitted, a direct comparison algorithm is used.

var A,B: TMtx; c: boolean; begin CreateIt(A,B); try A.SetIt(2,2,false,[1,2, 2,4]); // 2x2, real matrix B.SetIt(2,2,false,[1,2, 2,4]); // 2x2, real matrix c := A.Equal(B,1e-8); // Check for differences bigger than 0.00000001 c := A.Equal(B); // Check for an exact match finally FreeIt(A,B); end; end;
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!